﻿// Bravura : A music composition and audio synthesis framework.
//
// Copyright © 2011 Paul Vanukoff (pvanukoff@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.

using System.Collections.Generic;

namespace Bravura.Core.MusicLib.Model
{
	/// <summary>
	/// Model used by music engine, represents a musical composition.
	/// </summary>
	public class MusicProject : Element
	{
		private List<SynthProjectInfo> _synthProjects = new List<SynthProjectInfo>();
		private List<Element> _elementList = new List<Element>();
		private List<Block> _blockList = new List<Block>();

		public string Author
		{
			get;
			set;
		}

		public string Copyright
		{
			get;
			set;
		}

		public double BeatsPerMin
		{
			get;
			set;
		}

		public int TicksPerBeat
		{
			get;
			set;
		}

		public int StartBeat
		{
			get;
			set;
		}

		public int EndBeat
		{
			get { return StartBeat + Length; }
		}

		public List<SynthProjectInfo> SynthProjects
		{
			get { return _synthProjects; }
		}

		/// <summary>
		/// Global list of elements.
		/// </summary>
		public List<Element> ElementList
		{
			get { return _elementList; }
		}

		/// <summary>
		/// Global list of blocks.
		/// </summary>
		public List<Block> BlockList
		{
			get { return _blockList; }
		}

		public MusicProject()
		{
			this.Name = "New Project";
			this.Length = 16;
			this.BeatsPerMin = 120;
			this.TicksPerBeat = 12;
		}

	}
}
